package com.smartcommunity.api.user.fallBack;

import com.smartcommunity.api.user.UserApi;
import com.smartcommunity.bean.enumeration.ResultCode;
import com.smartcommunity.bean.model.Result;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * @ClassName: UserApiFallBack
 * @Description: 调用用户服务
 * @author: minsheng
 * @Date: 2019/1/14 15:04
 * @Company:
 * @version V1.5.0
 */
@Component
@RequestMapping("fallback")
@Slf4j
public class UserApiFallBack implements UserApi {

    @Override
    public Result addRelRoleVillage(Map<String,Object> param){
        log.error("调用user-service接口:addRelRoleVillage 时异常，服务不存在");
        return Result.error(ResultCode.USER_API_ERROR);
    }

    @Override
    public Result delRelRoleVillage(Map<String,Object> param){
        log.error("调用user-service接口:delRelRoleVillage 时异常，服务不存在");
        return Result.error(ResultCode.USER_API_ERROR);
    }

    @Override
    public Result getCurrentUserVillage(Integer quotationMarks) {
        log.error("调用userf服务接口:getCurrentUserVillage时异常");
        return Result.error(ResultCode.USER_API_ERROR);
    }

	@Override
	public Result getAllUserRoleId() {
		log.error("调用user-service接口:getAllUserRoleId 时异常，服务不存在");
        return Result.error(ResultCode.USER_API_ERROR);
	}

}
